package com.lysj.bhp.wallet.repository;

import com.lysj.bhp.wallet.domain.BhpcWallet;
import org.springframework.data.jpa.repository.JpaRepository;

import java.math.BigDecimal;
import java.util.List;

public interface BhpcWalletRepository extends JpaRepository<BhpcWallet,Long> {

    BhpcWallet findByUserId(Long userId);

    /**
     * 查询以太坊钱包距离上次查询最久的钱包
     * @return
     */
    BhpcWallet findFirstByOrderByLastQueryTimeAsc();

    List<BhpcWallet> findByAvailBalanceGreaterThan(BigDecimal bhpc);

}
